/*
 * @Description: 
 * @Author: mxy
 * @Date: 2022-12-04 21:22:17
 * @LastEditors: mxy
 * @LastEditTime: 2022-12-04 21:40:30
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import MyLogin from '@/components/MyLogin'

const routes = [
  { path: '/login', component: MyLogin },
  {
    path: '/home', component: () => import('@/components/MyHome'), children: [
      { path: 'users', component: () => import('@/components/menus/MyUsers') },
      { path: 'rights', component: () => import('@/components/menus/MyRights') },
      { path: 'goods', component: () => import('@/components/menus/MyGoods') },
      { path: 'orders', component: () => import('@/components/menus/MyOrders') },
      { path: 'settings', component: () => import('@/components/menus/MySettings') },
      { path: 'detail/:id', component: () => import('@/components/user/MyUserDetail') },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
